import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'controll/location_controller.dart';
import 'flutter_tencent_location_method_channel.dart';
import 'model/location.dart';

abstract class FlutterTencentLocationPlatform extends PlatformInterface {
  /// Constructs a FlutterTencentLocationPlatform.
  FlutterTencentLocationPlatform() : super(token: _token);

  static final Object _token = Object();

  static FlutterTencentLocationPlatform _instance =
      MethodChannelFlutterTencentLocation();

  /// The default instance of [FlutterTencentLocationPlatform] to use.
  ///
  /// Defaults to [MethodChannelFlutterTencentLocation].
  static FlutterTencentLocationPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [FlutterTencentLocationPlatform] when
  /// they register themselves.
  static set instance(FlutterTencentLocationPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  LocationController locationController = LocationController();

  Future<String?> getPlatformVersion() {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Future<String> init(String key) {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  void stopLocation() {
    throw UnimplementedError('stopLocation() has not been implemented.');
  }

  void setUserAgreePrivacy() {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Future<Location?> getLocation(int interval){
    throw UnimplementedError('platformVersion() has not been implemented.');
  }
}
